var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (n, e) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, n) {
              t.__proto__ = n;
            }) ||
          function (t, n) {
            for (var e in n)
              Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
          })(n, e);
      };
      return function (n, e) {
        function o() {
          this.constructor = n;
        }
        if ("function" != typeof e && null !== e)
          throw new TypeError(
            "Class extends value " + String(e) + " is not a constructor or null"
          );
        t(n, e),
          (n.prototype =
            null === e
              ? Object.create(e)
              : ((o.prototype = e.prototype), new o()));
      };
    })(),
  Alert = (function (t) {
    function n(n) {
      var e = t.call(this) || this;
      return (
        (e.isMust = !1),
        (e.content.text = n),
        e.bt_ok.on(Laya.Event.CLICK, e, e.btnOkFn),
        e
      );
    }
    return (
      __extends(n, t),
      (n.openText = function (t) {
        null == this.alert && (this.alert = new n(t)),
          (this.alert.content.text = t),
          this.alert.popup(!0);
      }),
      (n.openCall = function (t, n) {
        this.openText(t), (this.alert.listener = n), (this.alert.isMust = !0);
      }),
      (n.openBlock = function (t, e, o) {
        null == this.alert && (this.alert = new n(t)),
          (this.alert.content.text = t),
          this.alert.popup(!0);
      }),
      (n.prototype.btnOkFn = function () {
        var t = this.listener;
        null != t && (t.method.call(t.caller, null), (this.listener = null)),
          this.close("OK");
      }),
      (n.prototype.close = function (n) {
        ("side" == n && this.isMust) ||
          (this.isMust && (this.isMust = !1), t.prototype.close.call(this, n));
      }),
      (n.prototype.closeText = function () {}),
      n
    );
  })(ui.common.AlertUI);
